import request from '@/utils/request';

/**
 * 查询常用报销列表
 * @param query
 * @returns {*}
 */

export const listCybx = (query) => {
  return request({
    url: '/system/cybx/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询常用报销详细
 * @param id
 */
export const getCybx = (id) => {
  return request({
    url: `/system/cybx/getDetail/${id}`,
    method: 'get'
  });
};

/**
 * 新增常用报销
 * @param data
 */
export const addCybx = (data) => {
  return request({
    url: '/system/cybx',
    method: 'post',
    data: data
  });
};

/**
 * 修改常用报销
 * @param data
 */
export const updateCybx = (data) => {
  return request({
    url: '/system/cybx',
    method: 'put',
    data: data
  });
};

/**
 * 删除常用报销
 * @param id
 */
export const delCybx = (id) => {
  return request({
    url: '/system/cybx/' + id,
    method: 'delete'
  });
};
